{% extends "base.html" %}

{% load i18n %}

{% block title %}{% trans "Dissertation" %}{% endblock %}
{% block head %}{% trans "Dissertation" %}{% endblock %}

{% block content %}
        <p>| <a href="/dissertations/list/">{% trans "Back to the list"%}</a> |</p>
    <table class="list" align="center">
        <tr class="list">
            <td class="listleft">{%trans "Date"%}</td>
            <td class="listright">{{ dissertation.date|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Author First Name"%}</td>
            <td class="listright">{{ dissertation.author_first_name|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Author Last Name"%}</td>
            <td class="listright">{{ dissertation.author_last_name|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Author Email"%}</td>
            <td class="listright">{{ dissertation.author_email|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Author Phone"%}</td>
            <td class="listright">{{ dissertation.author_phone|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Filiation"%}</td>
            <td class="listright">{{ dissertation.filiation|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Filiation Country"%}</td>
            <td class="listright">{{ dissertation.filiation_country|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Presenter"%}</td>
            <td class="listright">{{ dissertation.presenter|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Main Author"%}</td>
            <td class="listright">{{ dissertation.main_author|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Registered"%}</td>
            <td class="listright">{{ dissertation.registered|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "Area"%}</td>
            <td class="listright">{{ dissertation.area|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{%trans "SubArea"%}</td>
            <td class="listright">{{ dissertation.sub_area|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{% trans "Language"%}</td>
            <td class="listright">{{ dissertation.language|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{% trans "Title"%}</td>
            <td class="listright">{{ dissertation.title|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{% trans "Dissertation"%}</td>
            <td class="listright">{{ dissertation.dissertation|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{% trans "Dissertation Type"%}</td>
            <td class="listright">{{ dissertation.dissertation_type|default_if_none:"" }}</td>
        </tr>
        <tr class="list">
            <td class="listleft">{% trans "Status"%}</td>
            <td class="listright">{{ dissertation.status|default_if_none:"" }}</td>
        </tr>
    </table>
    <br /><br />
    <!-- Comentarios -->
    <h2>Comments</h2>
    <table class="list" align="center" cellpadding="0" cellspacing="1">
        <form method="POST" action="/dissertations/show/{{ dissertation.id }}/">{% csrf_token %}
            <tr>
                <td class="listleft" style="text-align:right;" colspan="2">{{ form.comment }}<br />{{ form.comment.errors }}</td>
            </tr>
            <tr>
                <td class="listright" style="text-align:left;"></td>
                <td class="listright" style="text-align:center;"><input type="submit" value="{% trans "Save"%}" /></td>
            <tr>
        </form>
    </table>
    <br />
    <table class="tablesorter" align="center" border="0" cellpadding="0" cellspacing="1">
        <tbody>
            {% for obj in com %}
                <tr class="list">
                    <td><span class="list">{{ obj.date_time|date:"Y-m-d H:i" }}
                    - {% with firt_name=obj.author.contact.first_name last_name=obj.author.contact.last_name username=obj.author.contact.username %}
                    {% if firt_name %}
                        {{ firt_name }}
                        {% if last_name %}
                            {{ last_name }}
                        {% endif %}
                    {% else %}
                        {{ username }}
                    {% endif %}
                    {% endwith %}
                    {% trans "said"%}:</span><p>{{ obj.comment|linebreaksbr }}</p></td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
    <br /><br /><br /><br /><br /><br />
        <p>| <a href="/dissertations/list/">{% trans "Back to the list"%}</a> |</p>
    <br /><br /><br /><br /><br /><br />
{% endblock %}
 
